3.99 \(\int \frac {(a+b \log (c x^n))^2}{x^4 (d+e x)} \, dx\)

Optimal. Leaf size=273 \[ -\frac {2 b e^3 n \text {Li}_2\left (-\frac {d}{e x}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^4}+\frac {e^3 \log \left (\frac {d}{e x}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d^4}-\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{d^3 x}-\frac {2 b e^2 n \left (a+b \log \left (c x^n\right )\right )}{d^3 x}+\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{2 d^2 x^2}+\frac {b e n \left (a+b \log \left (c x^n\right )\right )}{2 d^2 x^2}-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{3 d x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right )}{9 d x^3}-\frac {2 b^2 e^3 n^2 \text {Li}_3\left (-\frac {d}{e x}\right )}{d^4}-\frac {2 b^2 e^2 n^2}{d^3 x}+\frac {b^2 e n^2}{4 d^2 x^2}-\frac {2 b^2 n^2}{27 d x^3} \]

[Out]

-2/27*b^2*n^2/d/x^3+1/4*b^2*e*n^2/d^2/x^2-2*b^2*e^2*n^2/d^3/x-2/9*b*n*(a+b*ln(c*x^n))/d/x^3+1/2*b*e*n*(a+b*ln(
c*x^n))/d^2/x^2-2*b*e^2*n*(a+b*ln(c*x^n))/d^3/x-1/3*(a+b*ln(c*x^n))^2/d/x^3+1/2*e*(a+b*ln(c*x^n))^2/d^2/x^2-e^
2*(a+b*ln(c*x^n))^2/d^3/x+e^3*ln(1+d/e/x)*(a+b*ln(c*x^n))^2/d^4-2*b*e^3*n*(a+b*ln(c*x^n))*polylog(2,-d/e/x)/d^
4-2*b^2*e^3*n^2*polylog(3,-d/e/x)/d^4

________________________________________________________________________________________

Rubi [A]  time = 0.36, antiderivative size = 295, normalized size of antiderivative = 1.08, number of steps used = 13, number of rules used = 8, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {2353, 2305, 2304, 2302, 30, 2317, 2374, 6589} \[ \frac {2 b e^3 n \text {PolyLog}\left (2,-\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^4}-\frac {2 b^2 e^3 n^2 \text {PolyLog}\left (3,-\frac {e x}{d}\right )}{d^4}-\frac {e^3 \left (a+b \log \left (c x^n\right )\right )^3}{3 b d^4 n}+\frac {e^3 \log \left (\frac {e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d^4}-\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{d^3 x}-\frac {2 b e^2 n \left (a+b \log \left (c x^n\right )\right )}{d^3 x}+\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{2 d^2 x^2}+\frac {b e n \left (a+b \log \left (c x^n\right )\right )}{2 d^2 x^2}-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{3 d x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right )}{9 d x^3}-\frac {2 b^2 e^2 n^2}{d^3 x}+\frac {b^2 e n^2}{4 d^2 x^2}-\frac {2 b^2 n^2}{27 d x^3} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2/(x^4*(d + e*x)),x]

[Out]

(-2*b^2*n^2)/(27*d*x^3) + (b^2*e*n^2)/(4*d^2*x^2) - (2*b^2*e^2*n^2)/(d^3*x) - (2*b*n*(a + b*Log[c*x^n]))/(9*d*
x^3) + (b*e*n*(a + b*Log[c*x^n]))/(2*d^2*x^2) - (2*b*e^2*n*(a + b*Log[c*x^n]))/(d^3*x) - (a + b*Log[c*x^n])^2/
(3*d*x^3) + (e*(a + b*Log[c*x^n])^2)/(2*d^2*x^2) - (e^2*(a + b*Log[c*x^n])^2)/(d^3*x) - (e^3*(a + b*Log[c*x^n]
)^3)/(3*b*d^4*n) + (e^3*(a + b*Log[c*x^n])^2*Log[1 + (e*x)/d])/d^4 + (2*b*e^3*n*(a + b*Log[c*x^n])*PolyLog[2,
-((e*x)/d)])/d^4 - (2*b^2*e^3*n^2*PolyLog[3, -((e*x)/d)])/d^4

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2353

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^4 (d+e x)} \, dx &=\int \left (\frac {\left (a+b \log \left (c x^n\right )\right )^2}{d x^4}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{d^2 x^3}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{d^3 x^2}-\frac {e^3 \left (a+b \log \left (c x^n\right )\right )^2}{d^4 x}+\frac {e^4 \left (a+b \log \left (c x^n\right )\right )^2}{d^4 (d+e x)}\right ) \, dx\\ &=\frac {\int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx}{d}-\frac {e \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx}{d^2}+\frac {e^2 \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx}{d^3}-\frac {e^3 \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx}{d^4}+\frac {e^4 \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{d+e x} \, dx}{d^4}\\ &=-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{3 d x^3}+\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{2 d^2 x^2}-\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{d^3 x}+\frac {e^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{d^4}-\frac {e^3 \operatorname {Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b d^4 n}+\frac {(2 b n) \int \frac {a+b \log \left (c x^n\right )}{x^4} \, dx}{3 d}-\frac {(b e n) \int \frac {a+b \log \left (c x^n\right )}{x^3} \, dx}{d^2}+\frac {\left (2 b e^2 n\right ) \int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx}{d^3}-\frac {\left (2 b e^3 n\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {e x}{d}\right )}{x} \, dx}{d^4}\\ &=-\frac {2 b^2 n^2}{27 d x^3}+\frac {b^2 e n^2}{4 d^2 x^2}-\frac {2 b^2 e^2 n^2}{d^3 x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right )}{9 d x^3}+\frac {b e n \left (a+b \log \left (c x^n\right )\right )}{2 d^2 x^2}-\frac {2 b e^2 n \left (a+b \log \left (c x^n\right )\right )}{d^3 x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{3 d x^3}+\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{2 d^2 x^2}-\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{d^3 x}-\frac {e^3 \left (a+b \log \left (c x^n\right )\right )^3}{3 b d^4 n}+\frac {e^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{d^4}+\frac {2 b e^3 n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x}{d}\right )}{d^4}-\frac {\left (2 b^2 e^3 n^2\right ) \int \frac {\text {Li}_2\left (-\frac {e x}{d}\right )}{x} \, dx}{d^4}\\ &=-\frac {2 b^2 n^2}{27 d x^3}+\frac {b^2 e n^2}{4 d^2 x^2}-\frac {2 b^2 e^2 n^2}{d^3 x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right )}{9 d x^3}+\frac {b e n \left (a+b \log \left (c x^n\right )\right )}{2 d^2 x^2}-\frac {2 b e^2 n \left (a+b \log \left (c x^n\right )\right )}{d^3 x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{3 d x^3}+\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{2 d^2 x^2}-\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{d^3 x}-\frac {e^3 \left (a+b \log \left (c x^n\right )\right )^3}{3 b d^4 n}+\frac {e^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{d^4}+\frac {2 b e^3 n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x}{d}\right )}{d^4}-\frac {2 b^2 e^3 n^2 \text {Li}_3\left (-\frac {e x}{d}\right )}{d^4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.14, size = 237, normalized size = 0.87 \[ \frac {-\frac {36 d^3 \left (a+b \log \left (c x^n\right )\right )^2}{x^3}-\frac {8 b d^3 n \left (3 a+3 b \log \left (c x^n\right )+b n\right )}{x^3}+\frac {54 d^2 e \left (a+b \log \left (c x^n\right )\right )^2}{x^2}+\frac {27 b d^2 e n \left (2 a+2 b \log \left (c x^n\right )+b n\right )}{x^2}+216 b e^3 n \left (\text {Li}_2\left (-\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )-b n \text {Li}_3\left (-\frac {e x}{d}\right )\right )+108 e^3 \log \left (\frac {e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac {108 d e^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac {216 b d e^2 n \left (a+b \log \left (c x^n\right )+b n\right )}{x}-\frac {36 e^3 \left (a+b \log \left (c x^n\right )\right )^3}{b n}}{108 d^4} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^2/(x^4*(d + e*x)),x]

[Out]

((-36*d^3*(a + b*Log[c*x^n])^2)/x^3 + (54*d^2*e*(a + b*Log[c*x^n])^2)/x^2 - (108*d*e^2*(a + b*Log[c*x^n])^2)/x
 - (36*e^3*(a + b*Log[c*x^n])^3)/(b*n) - (216*b*d*e^2*n*(a + b*n + b*Log[c*x^n]))/x + (27*b*d^2*e*n*(2*a + b*n
 + 2*b*Log[c*x^n]))/x^2 - (8*b*d^3*n*(3*a + b*n + 3*b*Log[c*x^n]))/x^3 + 108*e^3*(a + b*Log[c*x^n])^2*Log[1 +
(e*x)/d] + 216*b*e^3*n*((a + b*Log[c*x^n])*PolyLog[2, -((e*x)/d)] - b*n*PolyLog[3, -((e*x)/d)]))/(108*d^4)

________________________________________________________________________________________

fricas [F]  time = 0.49, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b^{2} \log \left (c x^{n}\right )^{2} + 2 \, a b \log \left (c x^{n}\right ) + a^{2}}{e x^{5} + d x^{4}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x^4/(e*x+d),x, algorithm="fricas")

[Out]

integral((b^2*log(c*x^n)^2 + 2*a*b*log(c*x^n) + a^2)/(e*x^5 + d*x^4), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{{\left (e x + d\right )} x^{4}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x^4/(e*x+d),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2/((e*x + d)*x^4), x)

________________________________________________________________________________________

maple [F]  time = 0.77, size = 0, normalized size = 0.00 \[ \int \frac {\left (b \ln \left (c \,x^{n}\right )+a \right )^{2}}{\left (e x +d \right ) x^{4}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*ln(c*x^n)+a)^2/x^4/(e*x+d),x)

[Out]

int((b*ln(c*x^n)+a)^2/x^4/(e*x+d),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {1}{6} \, a^{2} {\left (\frac {6 \, e^{3} \log \left (e x + d\right )}{d^{4}} - \frac {6 \, e^{3} \log \relax (x)}{d^{4}} - \frac {6 \, e^{2} x^{2} - 3 \, d e x + 2 \, d^{2}}{d^{3} x^{3}}\right )} + \int \frac {b^{2} \log \relax (c)^{2} + b^{2} \log \left (x^{n}\right )^{2} + 2 \, a b \log \relax (c) + 2 \, {\left (b^{2} \log \relax (c) + a b\right )} \log \left (x^{n}\right )}{e x^{5} + d x^{4}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x^4/(e*x+d),x, algorithm="maxima")

[Out]

1/6*a^2*(6*e^3*log(e*x + d)/d^4 - 6*e^3*log(x)/d^4 - (6*e^2*x^2 - 3*d*e*x + 2*d^2)/(d^3*x^3)) + integrate((b^2
*log(c)^2 + b^2*log(x^n)^2 + 2*a*b*log(c) + 2*(b^2*log(c) + a*b)*log(x^n))/(e*x^5 + d*x^4), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x^4\,\left (d+e\,x\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))^2/(x^4*(d + e*x)),x)

[Out]

int((a + b*log(c*x^n))^2/(x^4*(d + e*x)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \log {\left (c x^{n} \right )}\right )^{2}}{x^{4} \left (d + e x\right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2/x**4/(e*x+d),x)

[Out]

Integral((a + b*log(c*x**n))**2/(x**4*(d + e*x)), x)

________________________________________________________________________________________